package com.petalsgroup.petals.dao.Animation;

import com.petalsgroup.petals.pojo.*;

import java.util.Date;
import java.util.List;

public interface AnimationDao {
    CategoryDO getCategory(Integer cid);

    AnimationDetailedDO getAnimationDetailed(Integer aid);

    List<CommentsDO> getCommentsList(Integer aid);

    AnimationSimpleDO getAnimationSimple(Integer aid);

    List<AnimationSimpleDO> getAnimationMore(Integer categoryId);

    List<AnimationSimpleDO> getAllAnimationSimpleDO();

    List<CategoryDO> getAllCategory();

    long countAnimationSimple(String search);

    List<AnimationSimpleDO> listAnimationSimple(String search, int star, int num);

    long countAnimationSimple();

    List<AnimationSimpleDO> listAnimationSimple(int star, int num);

    long countAnimationSimpleRecently(String time);

    List<AnimationSimpleDO> listAnimationSimpleRecently(String time, int star, int num);

    List<AnimationSimpleDO> listAnimationSimpleByFlashTime(String week, int star, int num);

    long countAnimationSimpleBySearch(String sql);
/*
    List<AnimationSimpleDO> listAnimationSimpleBySearch(String sql, int star, int num);*/

    List<AnimationSimpleDO> listAnimationSimpleBySearch(String sql, int star, int end);

    List<AnimationSimpleDO> findAnimationByAname(String selectname);

    boolean addCollect(Integer aid,Integer uid);

    boolean removeCollect(Integer aid,Integer uid);

    boolean findCollect(Integer aid, Integer uid);

    int updateAnimationSimple(AnimationSimpleDO animationSimpleDO);

    int updateAnimationDetail(AnimationDetailedDO animationDetailedDO);

    int insertAnimationSimple(AnimationSimpleDO animationSimpleDO);

    int getAidByAname(AnimationSimpleDO animationSimpleDO);

    int insertAnimationDetail(AnimationDetailedDO animationDetailedDO);

    int deleteAnimationSimpleByAid(int aid);

    int deleteAnimationDetailByAid(int aid);

    List<Integer> listAllYear();
}
